package com.jk.smartelderlycare.controller;

import com.jk.smartelderlycare.dto.SysProcurement;
import com.jk.smartelderlycare.interfaces.SysProcurementServiceApi;
import com.jk.smartelderlycare.pojo.PagedResponse;
import com.jk.smartelderlycare.service.SysProcurementService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author hhk
 * @version 1.0
 * @ClassName SysProcurementController
 * @program: smart-elderly-care
 * @description: TODO
 * @date 2024/12/5 10:13
 */
@Slf4j
@RestController
public class SysProcurementController implements SysProcurementServiceApi {
    @Autowired
    private SysProcurementService sysProcurementService;

    @Override
    public PagedResponse<SysProcurement> findSysProcurementPaginationList(SysProcurement sysProcurement, Integer pageNum, Integer pageSize) {
        return sysProcurementService.findSysProcurementPaginationList(sysProcurement,pageNum,pageSize);
    }

    @Override
    public void addSysProcurement(SysProcurement sysProcurement) {
        sysProcurementService.addSysProcurement(sysProcurement);
    }

    @Override
    public void deleteSysProcurementById(Long documentId) {
        sysProcurementService.deleteSysProcurementById(documentId);
    }

    @Override
    public void upStatusById(Long documentId) {
        sysProcurementService.upStatusById(documentId);
    }

    @Override
    public void downStatusById(Long documentId) {
        sysProcurementService.downStatusById(documentId);
    }

    @Override
    public void findSysProcurementById(Long documentId) {
        sysProcurementService.findSysProcurementById(documentId);
    }

    @Override
    public void updateSysProcurement(SysProcurement sysProcurement) {
        sysProcurementService.updateSysProcurement(sysProcurement);
    }

    @Override
    public List<SysProcurement> findSysProcurement() {
        return sysProcurementService.findSysProcurement();
    }

    @Override
    public void addProcurement(SysProcurement sysProcurement) {
        sysProcurementService.addProcurement(sysProcurement);
    }

    @Override
    public void ShutdownStatusById(Long documentId) {
        sysProcurementService.ShutdownStatusById(documentId);
    }
}
